<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>安全设置</title>
    <link rel="stylesheet" th:href="@{/layui/layui.css}"  media="all" />
    <link rel="stylesheet" th:href="@{/css/index.css}"  />

</head>
<body>
<div class="main">
    <div class="m_all20">
        <blockquote class="clear layui-elem-quote">修改密码</blockquote>
        <form  class="layui-form">
            <center><table class="tables w_50 f15 hl45">
                <tbody><tr><th>修改密码</th></tr>
                <tr>
                    <td align="center">原密码：　　<div class="layui-inline"><input type="password" id="oldpass" class="layui-input"/></div></td>
                </tr>
                <tr>
                    <td align="center">新密码：　　<div class="layui-inline"><input type="password" id="newpass" class="layui-input"/></div></td>
                </tr>
                <tr>
                    <td align="center">重复输入：　<div class="layui-inline"><input type="password" id="newpass2" class="layui-input"/></div></td>
                </tr>
                <tr>
                    <td align="center" class="p_all20">
                        <button id="saveBtn" class="layui-btn layui-btn-big layui-bt11n-normal white" type="button" name="into_class" >保存</button>
                        <button type="reset" class="layui-btn layui-btn-big layui-btn-warm white" name="reset" id="backid">清空</button>
                    </td>
                </tr>
                </tbody></table></center>
        </form>
    </div>
</div>
<script type="text/javascript" th:src="@{/js/jquery-3.2.1.js}"></script>
<script th:src="@{/layui/layui.all.js}"></script>

<script>

    var pwd;
    var oldPwd;
    var newPwd;
    var newPwd2;

    $('#saveBtn').click(function(){
        oldPwd = $('#oldpass').val();
        newPwd = $('#newpass').val();
        newPwd2 = $('#newpass2').val();

        console.log(oldPwd+ ""+ newPwd +""+ newPwd2);


        $.post("/dor/checkfomXt", {
            oldPwd: oldPwd,
            newPwd: newPwd,
            reNewPwd: newPwd2
        }, function(data){
            layer.open({
                title: '信息',
                content: data //注意，如果str是object，那么需要字符拼接。
            });

        });


    });

</script>
</body>

</html>